import request from '@/utils/request'

// 获取知识分类树列表
export function deptTree(query) {
  return request({
    url: '/system/type/deptTree',
    method: 'get',
    params: query
  })
}
export function typeList(query) {
  return request({
    url: '/system/type/list',
    method: 'get',
    params: query
  })
}
// 新增知识分类
export function typeAdd(data) {
  return request({
    url: '/system/type',
    method: 'post',
    data: data
  })
}
// 新增知识分类
export function typeEdit(data) {
  return request({
    url: '/system/type',
    method: 'put',
    data: data
  })
}
export function typeDel(data) {
  return request({
    url: '/system/type/' + data,
    method: 'DELETE',
    data: data
  })
}